<template>
	<view class="">
		<view class="sign_banner">
			<image src="../../static/image/mine/new/sign_banner.png" mode="widthFix"></image>
			<view class="sign_info">
				<view class="sign_info_title">
					签到红包
				</view>
				<view class="sign_info_price">
					0.2 <text>元</text>
				</view>
				<view class="sign_info_statistics">
					已连续签到1天
				</view>
			</view>
			<view class="myPaper" @tap="toPaper">
				我的红包 >
			</view>
			<view class="sign_card">
				<view class="sign_paper">
					<view class="sign_paper_item" v-for="(item,index) in paper" :key="index">
						<view class="sign_tips">
							明日可领
							<view class="sign_tips_jt"></view>
						</view>
						<view class="sign_paper_i" v-if=" index != 6">
							<view class="sign_paper_i_con" v-if="!item.state">
								<image src="../../static/image/mine/new/sign02.png" mode=""></image>
								<view class="sign_paper_day">
									{{item.day}}
								</view>
								<view class="sign_paper_paper">
									待领红包
								</view>
							</view>
							<view class="sign_paper_i_con" v-else>
								<image src="../../static/image/mine/new/sign01.png" mode=""></image>
								<view class="sign_paper_price">
									+{{item.redpaper}}元
								</view>
								<view class="sign_paper_state">
									<view class="sign_paper_state_t">
										已领取
									</view>
									<image class="sign_paper_state_b" src="../../static/image/mine/new/dg.png" mode=""></image>
								</view>
							</view>
						</view>
						<view class="sign_paper_item_six" v-else>
							<view class="sign_paper_item_six_i" v-if="!item.state">
								<image src="../../static/image/mine/new/sign03.png" mode=""></image>
								<view class="sign_paper_day">
									{{item.day}}
								</view>
								<view class="sign_paper_paper">
									惊喜红包
								</view>
							</view>
							<view class="sign_paper_item_six_i" v-else>
								<image src="../../static/image/mine/new/sign04.png" mode=""></image>
								<view class="sign_paper_price">
									+{{item.redpaper}}元
								</view>
								<view class="sign_paper_state_six">
									<view class="sign_paper_state_t">
										已领取
									</view>
									<image class="sign_paper_state_b" src="../../static/image/mine/new/dg.png" mode=""></image>
								</view>
							</view>
						</view>
					</view>
				</view>
				<!-- 邀请好友签到 -->
				<view class="friend">
					邀请好友签到
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				paper: [
					{
						day:'第一天',
						redpaper: '0.3',
						state: 1
					},
					{
						day:'第二天',
						redpaper: '0.3',
						state: 0
					},
					{
						day:'第三天',
						redpaper: '0.3',
						state: 0
					},
					{
						day:'第四天',
						redpaper: '0.3',
						state: 0
					},
					{
						day:'第五天',
						redpaper: '0.3',
						state: 1
					},
					{
						day:'第六天',
						redpaper: '0.3',
						state: 0
					},
					{
						day:'第七天',
						redpaper: '0.3',
						state: 1
					}
				]
			}
		},
		methods: {
			toPaper () {
				uni.navigateTo({
					url: '../../pageB/redPaper/redPaper'
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.sign_banner {
		width: 100%;
		position: relative;
		
		image {
			width: 100%;
			height: 100%;
		}
	}
	.sign_info {
		position: absolute;
		width: 280upx;
		height: 160upx;
		top: 130upx;
		left: 260upx;
		.sign_info_title {
			font-size: 28upx;
			color: #000000;
		}
		.sign_info_price {
			font-size: 48upx;
			color: #000000;
			margin: 10upx 0;
			text {
				font-size: 24upx;
			}
		}
		.sign_info_statistics {
			font-size: 28upx;
			color: #333333;
		}
	}
	.sign_card {
		position: absolute;
		left: 50%;
		top: 500upx;
		transform: translate(-50%);
		width: calc(100% - 60upx);
		height: 610upx;
		background-color: #FFFFFF;
		border-radius: 20upx;
		padding: 0 15upx 0 10upx;
		box-sizing: border-box;
		.sign_paper {
			margin-top: 60upx;
			width: 100%;
			height: 400upx;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
		}
		.sign_paper_i {
			width: 144upx;
			height: 174upx;
			position: relative;
			image {
				width: 144upx;
				height: 174upx;
			}
			.sign_paper_i_con {
				width: 144upx;
				height: 174upx;
				position: absolute;
				top: 0;
				left: 0;
			}
			.sign_paper_day {
				position: absolute;
				top: 8upx;
				left: 54%;
				transform: translate(-50%);
				width: 110upx;
				height: 32upx;
				border-radius: 8upx;
				color: #FFFFFF;
				font-size: 24upx;
				text-align: center;
				line-height: 32upx;
				background-color: #c24f44;
			}
			.sign_paper_paper {
				position: absolute;
				bottom: 30upx;
				left: 54%;
				transform: translate(-50%);
				font-size: 28upx;
				color: #FFFFFF;
				white-space: nowrap;
			}
		}
		.sign_paper_price {
			position: absolute;
			font-size: 24upx;
			top: 8upx;
			left: 52%;
			font-size: 24upx;
			text-align: center;
			white-space: nowrap;
			line-height: 32upx;
			color: #FFFFFF;
			transform: translate(-50%);
		}
		.sign_paper_state {
			position: absolute;
			left: 54%;
			transform: translate(-50%);
			font-size: 24upx;
			bottom: 10upx;
			text-align: center;
			.sign_paper_state_t {
				font-size: 28upx;
				color: #FFFFFF;
				white-space: nowrap;
			}
			.sign_paper_state_b {
				width: 27upx;
				height: 27upx;
			}
		}
		.sign_paper_item_six {
			width: 323upx;
			height: 180upx;
			position: relative;
			.sign_paper_item_six_i {
				width: 100%;
				height: 100%;
				position: absolute;
				left: 0;
				top: 0;
			}
			image {
				width: 100%;
				height: 100%;
			}
			.sign_paper_day {
				position: absolute;
				top: 8upx;
				left: 54%;
				transform: translate(-50%);
				width: 110upx;
				height: 32upx;
				border-radius: 8upx;
				color: #FFFFFF;
				font-size: 24upx;
				text-align: center;
				line-height: 32upx;
				background-color: #c24f44;
			}
			.sign_paper_paper {
				position: absolute;
				bottom: 36upx;
				left: 40upx;
				font-size: 28upx;
				color: #fee903;
			}
		}
	}
	.sign_paper_state_six {
		display: flex;
		align-items: center;
		position: absolute;
		left: 40upx;
		bottom: 30upx;
		.sign_paper_state_t {
			font-size: 28upx;
			color: #FFFFFF;
			white-space: nowrap;
		}
		.sign_paper_state_b {
			width: 27upx !important;
			height: 27upx !important;
			margin-left: 10upx;
		}
	}
	.sign_paper_item {
		position: relative;
		.sign_tips {
			animation: topB 2s infinite;
			position: absolute;
			width: 120upx;
			height: 32upx;
			line-height: 32upx;
			font-size: 24upx;
			color: #333333;
			text-align: center;
			background-color: #ffda12;
			right: -10upx;
			top: -30upx;
			z-index: 9;
			.sign_tips_jt {
				position: absolute;
				right: 20upx;
				top: 100%;
				width: 0;
				height: 0;
				border-left: 10upx solid transparent;
				border-right: 10upx solid transparent;
				border-top: 10upx solid #ffda12;
				border-bottom: 10upx solid transparent;
			}
		}
	}
	.friend {
		width: 546upx;
		height: 88upx;
		background: linear-gradient(to right,#f73e2f 0%,#fc5c2f 100%);
		font-size: 32upx;
		color: #FFFFFF;
		line-height: 88upx;
		text-align: center;
		border-radius: 10upx;
		margin: 20upx auto;
		box-shadow: 0upx 0upx 20upx 0upx #fc5c2f;
	}
	.myPaper {
		width: 140upx;
		height: 40upx;
		background-color: #FFFFFF;
		position: absolute;
		right: 0;
		top: 80upx;
		border-top-left-radius: 20upx;
		border-bottom-left-radius: 20upx;
		text-align: center;
		font-size: 24upx;
		line-height: 40upx;
	}
	@keyframes topB
	{
		0% {
			transform: translateY(0%);
		}
		50% {
			transform: translateY(-100%);
		}
		100% {
			transform: translateY(0%);
		}
	}
</style>
